{
 "metadata": {
  "signature": "sha256:6a0d87c0286ee4da39c6ff0e5eee67a824a84cefe7a7f6023b9ceef3114d20bb"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "code",
     "collapsed": false,
     "id": "3A1A546D17134112869517F637E4C185",
     "input": [
      "DataAPI.SecIDGet(partyID=u\"\",assetClass=u\"\",ticker=u\"000001,600000\",cnSpell=u\"\",field=u\"\",pandas=\"1\")"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "html": [
        "<div style=\"max-width:1500px;overflow:auto;\">\n",
        "<table border=\"1\" class=\"dataframe\">\n",
        "  <thead>\n",
        "    <tr style=\"text-align: right;\">\n",
        "      <th></th>\n",
        "      <th>secID</th>\n",
        "      <th>ticker</th>\n",
        "      <th>secShortName</th>\n",
        "      <th>cnSpell</th>\n",
        "      <th>exchangeCD</th>\n",
        "      <th>assetClass</th>\n",
        "      <th>listStatusCD</th>\n",
        "      <th>listDate</th>\n",
        "      <th>transCurrCD</th>\n",
        "      <th>ISIN</th>\n",
        "      <th>partyID</th>\n",
        "    </tr>\n",
        "  </thead>\n",
        "  <tbody>\n",
        "    <tr>\n",
        "      <th>0</th>\n",
        "      <td>000001.OFCN</td>\n",
        "      <td>000001</td>\n",
        "      <td>\u534e\u590f\u6210\u957f\u6df7\u5408</td>\n",
        "      <td>HXCCHH</td>\n",
        "      <td>NaN</td>\n",
        "      <td>F</td>\n",
        "      <td>UN</td>\n",
        "      <td>NaN</td>\n",
        "      <td>CNY</td>\n",
        "      <td>NaN</td>\n",
        "      <td>26812</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>1</th>\n",
        "      <td>000001.XIBE</td>\n",
        "      <td>000001</td>\n",
        "      <td>00\u56fd\u503a01</td>\n",
        "      <td>00GZ01</td>\n",
        "      <td>XIBE</td>\n",
        "      <td>B</td>\n",
        "      <td>DE</td>\n",
        "      <td>2000-03-07</td>\n",
        "      <td>CNY</td>\n",
        "      <td>CND0000000S5</td>\n",
        "      <td>11327</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>2</th>\n",
        "      <td>000001.XSHE</td>\n",
        "      <td>000001</td>\n",
        "      <td>\u5e73\u5b89\u94f6\u884c</td>\n",
        "      <td>PAYH</td>\n",
        "      <td>XSHE</td>\n",
        "      <td>E</td>\n",
        "      <td>L</td>\n",
        "      <td>1991-04-03</td>\n",
        "      <td>CNY</td>\n",
        "      <td>CNE000000040</td>\n",
        "      <td>2</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>3</th>\n",
        "      <td>000001.ZICN</td>\n",
        "      <td>000001</td>\n",
        "      <td>\u4e0a\u8bc1\u7efc\u6307</td>\n",
        "      <td>SZZZ</td>\n",
        "      <td>XSHG</td>\n",
        "      <td>IDX</td>\n",
        "      <td>NaN</td>\n",
        "      <td>NaN</td>\n",
        "      <td>NaN</td>\n",
        "      <td>CNM000000019</td>\n",
        "      <td>17764</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>4</th>\n",
        "      <td>600000.XSHG</td>\n",
        "      <td>600000</td>\n",
        "      <td>\u6d66\u53d1\u94f6\u884c</td>\n",
        "      <td>PFYH</td>\n",
        "      <td>XSHG</td>\n",
        "      <td>E</td>\n",
        "      <td>L</td>\n",
        "      <td>1999-11-10</td>\n",
        "      <td>CNY</td>\n",
        "      <td>CNE0000011B7</td>\n",
        "      <td>603</td>\n",
        "    </tr>\n",
        "  </tbody>\n",
        "</table>\n",
        "</div>"
       ],
       "metadata": {},
       "output_type": "pyout",
       "prompt_number": 1,
       "text": [
        "         secID  ticker secShortName cnSpell exchangeCD assetClass  \\\n",
        "0  000001.OFCN  000001       \u534e\u590f\u6210\u957f\u6df7\u5408  HXCCHH        NaN          F   \n",
        "1  000001.XIBE  000001       00\u56fd\u503a01  00GZ01       XIBE          B   \n",
        "2  000001.XSHE  000001         \u5e73\u5b89\u94f6\u884c    PAYH       XSHE          E   \n",
        "3  000001.ZICN  000001         \u4e0a\u8bc1\u7efc\u6307    SZZZ       XSHG        IDX   \n",
        "4  600000.XSHG  600000         \u6d66\u53d1\u94f6\u884c    PFYH       XSHG          E   \n",
        "\n",
        "  listStatusCD    listDate transCurrCD          ISIN  partyID  \n",
        "0           UN         NaN         CNY           NaN    26812  \n",
        "1           DE  2000-03-07         CNY  CND0000000S5    11327  \n",
        "2            L  1991-04-03         CNY  CNE000000040        2  \n",
        "3          NaN         NaN         NaN  CNM000000019    17764  \n",
        "4            L  1999-11-10         CNY  CNE0000011B7      603  "
       ]
      }
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "id": "FAA194924F7C45F5825F1729BC88A11A",
     "input": [
      "DataAPI.SecIDGet(partyID=u\"\",assetClass=u\"\",ticker=u\"\",cnSpell=[u\"mdjt\",u\"txkg\",u\"zgpa\",u\"zhzb\"],field=u\"\",pandas=\"1\")"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "html": [
        "<div style=\"max-width:1500px;overflow:auto;\">\n",
        "<table border=\"1\" class=\"dataframe\">\n",
        "  <thead>\n",
        "    <tr style=\"text-align: right;\">\n",
        "      <th></th>\n",
        "      <th>secID</th>\n",
        "      <th>ticker</th>\n",
        "      <th>secShortName</th>\n",
        "      <th>cnSpell</th>\n",
        "      <th>exchangeCD</th>\n",
        "      <th>assetClass</th>\n",
        "      <th>listStatusCD</th>\n",
        "      <th>listDate</th>\n",
        "      <th>transCurrCD</th>\n",
        "      <th>ISIN</th>\n",
        "      <th>partyID</th>\n",
        "    </tr>\n",
        "  </thead>\n",
        "  <tbody>\n",
        "    <tr>\n",
        "      <th>0</th>\n",
        "      <td>000333.XSHE</td>\n",
        "      <td>000333</td>\n",
        "      <td>\u7f8e\u7684\u96c6\u56e2</td>\n",
        "      <td>MDJT</td>\n",
        "      <td>XSHE</td>\n",
        "      <td>E</td>\n",
        "      <td>L</td>\n",
        "      <td>2013-09-18</td>\n",
        "      <td>CNY</td>\n",
        "      <td>CNE100001QQ5</td>\n",
        "      <td>3522</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>1</th>\n",
        "      <td>00700.XHKG</td>\n",
        "      <td>00700</td>\n",
        "      <td>\u817e\u8baf\u63a7\u80a1</td>\n",
        "      <td>TXKG</td>\n",
        "      <td>XHKG</td>\n",
        "      <td>E</td>\n",
        "      <td>L</td>\n",
        "      <td>2004-06-16</td>\n",
        "      <td>HKD</td>\n",
        "      <td>NaN</td>\n",
        "      <td>10001408</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>2</th>\n",
        "      <td>02318.XHKG</td>\n",
        "      <td>02318</td>\n",
        "      <td>\u4e2d\u56fd\u5e73\u5b89</td>\n",
        "      <td>ZGPA</td>\n",
        "      <td>XHKG</td>\n",
        "      <td>E</td>\n",
        "      <td>L</td>\n",
        "      <td>2004-06-24</td>\n",
        "      <td>HKD</td>\n",
        "      <td>NaN</td>\n",
        "      <td>2264</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>3</th>\n",
        "      <td>300140.XSHE</td>\n",
        "      <td>300140</td>\n",
        "      <td>\u4e2d\u73af\u88c5\u5907</td>\n",
        "      <td>ZHZB</td>\n",
        "      <td>XSHE</td>\n",
        "      <td>E</td>\n",
        "      <td>L</td>\n",
        "      <td>2010-11-12</td>\n",
        "      <td>CNY</td>\n",
        "      <td>CNE100000WL6</td>\n",
        "      <td>39211</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>4</th>\n",
        "      <td>600705.XSHG</td>\n",
        "      <td>600705</td>\n",
        "      <td>\u4e2d\u822a\u8d44\u672c</td>\n",
        "      <td>ZHZB</td>\n",
        "      <td>XSHG</td>\n",
        "      <td>E</td>\n",
        "      <td>L</td>\n",
        "      <td>1996-05-16</td>\n",
        "      <td>CNY</td>\n",
        "      <td>CNE000000KC1</td>\n",
        "      <td>1211</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>5</th>\n",
        "      <td>601318.XSHG</td>\n",
        "      <td>601318</td>\n",
        "      <td>\u4e2d\u56fd\u5e73\u5b89</td>\n",
        "      <td>ZGPA</td>\n",
        "      <td>XSHG</td>\n",
        "      <td>E</td>\n",
        "      <td>L</td>\n",
        "      <td>2007-03-01</td>\n",
        "      <td>CNY</td>\n",
        "      <td>CNE000001R84</td>\n",
        "      <td>2264</td>\n",
        "    </tr>\n",
        "    <tr>\n",
        "      <th>6</th>\n",
        "      <td>DY0043772FP.CNFP</td>\n",
        "      <td>DY0043772FP</td>\n",
        "      <td>\u5c55\u6052\u5c55\u535a</td>\n",
        "      <td>ZHZB</td>\n",
        "      <td>NaN</td>\n",
        "      <td>FP</td>\n",
        "      <td>NaN</td>\n",
        "      <td>NaN</td>\n",
        "      <td>NaN</td>\n",
        "      <td>NaN</td>\n",
        "      <td>50004476</td>\n",
        "    </tr>\n",
        "  </tbody>\n",
        "</table>\n",
        "</div>"
       ],
       "metadata": {},
       "output_type": "pyout",
       "prompt_number": 6,
       "text": [
        "              secID       ticker secShortName cnSpell exchangeCD assetClass  \\\n",
        "0       000333.XSHE       000333         \u7f8e\u7684\u96c6\u56e2    MDJT       XSHE          E   \n",
        "1        00700.XHKG        00700         \u817e\u8baf\u63a7\u80a1    TXKG       XHKG          E   \n",
        "2        02318.XHKG        02318         \u4e2d\u56fd\u5e73\u5b89    ZGPA       XHKG          E   \n",
        "3       300140.XSHE       300140         \u4e2d\u73af\u88c5\u5907    ZHZB       XSHE          E   \n",
        "4       600705.XSHG       600705         \u4e2d\u822a\u8d44\u672c    ZHZB       XSHG          E   \n",
        "5       601318.XSHG       601318         \u4e2d\u56fd\u5e73\u5b89    ZGPA       XSHG          E   \n",
        "6  DY0043772FP.CNFP  DY0043772FP         \u5c55\u6052\u5c55\u535a    ZHZB        NaN         FP   \n",
        "\n",
        "  listStatusCD    listDate transCurrCD          ISIN   partyID  \n",
        "0            L  2013-09-18         CNY  CNE100001QQ5      3522  \n",
        "1            L  2004-06-16         HKD           NaN  10001408  \n",
        "2            L  2004-06-24         HKD           NaN      2264  \n",
        "3            L  2010-11-12         CNY  CNE100000WL6     39211  \n",
        "4            L  1996-05-16         CNY  CNE000000KC1      1211  \n",
        "5            L  2007-03-01         CNY  CNE000001R84      2264  \n",
        "6          NaN         NaN         NaN           NaN  50004476  "
       ]
      }
     ]
    },
    {
     "cell_type": "markdown",
     "id": "679A8F7DA56F436D98846D0543A97D24",
     "metadata": {},
     "source": [
      "# \u5982\u4f55\u83b7\u53d6\u80a1\u7968\u4fe1\u606f, \u7528\u4e8e\u4ee3\u7801\u548c\u7b56\u7565"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "id": "26A2A41D705944DF907E2994292E143E",
     "input": [
      "# \u83b7\u53d6\u80a1\u7968\u4fe1\u606f\u7684object\n",
      "stock = get_asset('600705.XSHG')\n",
      "stock."
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "metadata": {},
       "output_type": "pyout",
       "prompt_number": 2,
       "text": [
        "<StockAssetInfo symbol=600705.XSHG, name=\u4e2d\u822a\u8d44\u672c, list_date=1996-05-16, last_date=None>"
       ]
      }
     ]
    },
    {
     "cell_type": "markdown",
     "id": "71824FE5F04C4FB498EF69A7233C580B",
     "metadata": {},
     "source": [
      "# \u5982\u4f55\u8c03\u53d6\u6807\u7684\u6570\u636e"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "id": "20853CD1D19D47E683F386AE2ECEC4FF",
     "input": [
      "DataAPI.MktEqudGet(tradeDate=u\"20150513\",secID=u\"\",ticker=u\"000333\",beginDate=u\"\",endDate=u\"\",isOpen=\"\",field=u\"\",pandas=\"1\")"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "html": [
        "<div style=\"max-width:1500px;overflow:auto;\">\n",
        "<table border=\"1\" class=\"dataframe\">\n",
        "  <thead>\n",
        "    <tr style=\"text-align: right;\">\n",
        "      <th></th>\n",
        "      <th>secID</th>\n",
        "      <th>ticker</th>\n",
        "      <th>secShortName</th>\n",
        "      <th>exchangeCD</th>\n",
        "      <th>tradeDate</th>\n",
        "      <th>preClosePrice</th>\n",
        "      <th>actPreClosePrice</th>\n",
        "      <th>openPrice</th>\n",
        "      <th>highestPrice</th>\n",
        "      <th>lowestPrice</th>\n",
        "      <th>...</th>\n",
        "      <th>turnoverRate</th>\n",
        "      <th>accumAdjFactor</th>\n",
        "      <th>negMarketValue</th>\n",
        "      <th>marketValue</th>\n",
        "      <th>chgPct</th>\n",
        "      <th>PE</th>\n",
        "      <th>PE1</th>\n",
        "      <th>PB</th>\n",
        "      <th>isOpen</th>\n",
        "      <th>vwap</th>\n",
        "    </tr>\n",
        "  </thead>\n",
        "  <tbody>\n",
        "    <tr>\n",
        "      <th>0</th>\n",
        "      <td>000333.XSHE</td>\n",
        "      <td>000333</td>\n",
        "      <td>\u7f8e\u7684\u96c6\u56e2</td>\n",
        "      <td>XSHE</td>\n",
        "      <td>2015-05-13</td>\n",
        "      <td>35.46</td>\n",
        "      <td>35.46</td>\n",
        "      <td>35.55</td>\n",
        "      <td>36.5</td>\n",
        "      <td>35.2</td>\n",
        "      <td>...</td>\n",
        "      <td>0.0173</td>\n",
        "      <td>0.62412</td>\n",
        "      <td>8.051422e+10</td>\n",
        "      <td>1.513475e+11</td>\n",
        "      <td>0.0124</td>\n",
        "      <td>13.3871</td>\n",
        "      <td>11.3212</td>\n",
        "      <td>3.5247</td>\n",
        "      <td>1</td>\n",
        "      <td>35.86</td>\n",
        "    </tr>\n",
        "  </tbody>\n",
        "</table>\n",
        "<p>1 rows \u00d7 24 columns</p>\n",
        "</div>"
       ],
       "metadata": {},
       "output_type": "pyout",
       "prompt_number": 3,
       "text": [
        "         secID  ticker secShortName exchangeCD   tradeDate  preClosePrice  \\\n",
        "0  000333.XSHE  000333         \u7f8e\u7684\u96c6\u56e2       XSHE  2015-05-13          35.46   \n",
        "\n",
        "   actPreClosePrice  openPrice  highestPrice  lowestPrice  ...    \\\n",
        "0             35.46      35.55          36.5         35.2  ...     \n",
        "\n",
        "   turnoverRate  accumAdjFactor  negMarketValue   marketValue  chgPct  \\\n",
        "0        0.0173         0.62412    8.051422e+10  1.513475e+11  0.0124   \n",
        "\n",
        "        PE      PE1      PB  isOpen   vwap  \n",
        "0  13.3871  11.3212  3.5247       1  35.86  \n",
        "\n",
        "[1 rows x 24 columns]"
       ]
      }
     ]
    }
   ],
   "metadata": {}
  }
 ]
}